<?php
	require_once('inc.config.php');
	
	$action = $_GET["action"];
	$type = $_GET["type"];
	$value = $_GET["value"];

	if($action=="check"){
		if($type=="number"){
			$result = $myRegister->isAebyNumber($_GET["anumber"]);
		}else if($type=="name"){
			$result = $myRegister->isSameByName($_GET["aname"]);
		}
	}else if($action=="check_user"){
		if($type=="name"){
			$result = $myRegister->isSameByName($_GET["uname"]);
		}
	}else if($action=="check_kuser"){
		if($type=="name"){
			$result = $myRegister->isSameByName($_GET["kname"]);
		}
	}else if($action == "check_pwd"){
		if($type=="pwd"){
			$result = $myRegister->checkOldpwd($_GET["opassword"]);
		}
	}else if($action == "check_kuserpwd"){
		if($type=="pwd"){
			$result = $myRegister->checkOldKuserpwd($_GET["opassword"]);
		}
	}

	if($result=="success"){
		echo "true";
	}else{
		echo "false";
	}
?>